package com.achen.elasticsearch.dao;

import com.achen.elasticsearch.pojo.Emp;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import javax.validation.constraints.Max;
import java.util.List;

/**
 * @author limeng
 * @create 2021-05-11 16:54
 */
public interface EmpRepository extends ElasticsearchRepository<Emp,String> {

    List<Emp> findByName(String name);

    //根据姓名和地址
    List<Emp> findByNameAndAddress(String name, String address);

    List<Emp> findByAddress(String address);

}
